/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Pack_1;

import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author sp116880
 */
@WebService(serviceName = "Web_service1")
@Stateless()
public class Web_service1 {
    @EJB
    private NewSessionBeanLocal ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "addLibro")
    @Oneway
    public void addLibro(@WebParam(name = "titolo") String titolo) {
        ejbRef.addLibro(titolo);
    }

    @WebMethod(operationName = "findAll")
    public List<Libro> findAll() {
        return ejbRef.findAll();
    }
    
}
